$(document).ready(function () {
  // 在这里写你的代码...
  init();
});

// 初始化
function init() {
  $(".hospitalBg").text("广灵人民医院");
  keshimenzhenTabsFun();
  gekeshifeiyongmingxiFun();
  // gekeshichuyuanhuanzhefenxiFun();
  // 门诊费用
  leftAmenzhenFun();
  //左表二之放射Dr
  leftByiyaofeiFun();
  //左表三之请求
  chuyuanhuanzhefenxiFun();
  // leftCfuchankezhuyuanFun();
  zhuyuanrenshutongjiFun();
  chuangweishiyonglvFun();
  //点击地图
  mapWrapFun();
  clickDotsFun();
  // header数据
  mainHeadFun();
  // 门诊日志
  mainmenzhenrizhiFun();
  // 右表2
  jiuzhenhuanzheFun();

  var intervalId = setInterval(function () {
    mainHeadFun(); //header数据
    mainmenzhenrizhiFun(); // 门诊日志
    zhuyuanrenshutongjiFun(); //右表1
    jiuzhenhuanzheFun(); // 右表2
    chuangweishiyonglvFun(); //右表3
    chuyuanhuanzhefenxiFun(); //左表3
    leftByiyaofeiFun(); //左表2 放射DR
    leftAmenzhenFun(); //左表1 门诊

    // clearInterval(intervalId);
  }, 3000);
}
//广灵医疗集团
function guanglinyiliaojituan() {
  // console.log("广灵医疗集团");
  var guanglingyiliaojituan = "gongweidashuju";
  goXXpageFunA(guanglingyiliaojituan);
}
//公共卫生系统
function gonggweishengxitong() {
  var gongweidashuju = "guanglingyiliaojituan";
  goXXpageFunA(gongweidashuju);
}
//广灵人民医院
function guanglingrenmingyiyuanFun() {
  var guanglingrenmingyiyuan = "guanglingrenmingyiyuan";
  goXXpageFunA(guanglingrenmingyiyuan);
}

//各科室门诊Tabs
function keshimenzhenTabsFun() {
  $("#yaopinfeiyongLiId").click(function () {
    $("#mengzhengfeiyongBgId").hide();
    $("#renjunfeiyongBgId").hide();
    $("#yaopinfeiyongBgId").show();
    // 线
    $(this).children().eq(1).show();
    $("#mengzhengfeiyongLiId").children().eq(1).hide();
    $("#renjunfeiyongLiId").children().eq(1).hide();
    //调图表方法
    leftAyaopinFun();
  });
  $("#renjunfeiyongLiId").click(function () {
    $("#mengzhengfeiyongBgId").hide();
    $("#renjunfeiyongBgId").show();
    $("#yaopinfeiyongBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#mengzhengfeiyongLiId").children().eq(1).hide();
    $("#yaopinfeiyongLiId").children().eq(1).hide();

    //调图表方法
    leftArenjunfenyongFun();
  });
  $("#mengzhengfeiyongLiId").click(function () {
    $("#mengzhengfeiyongBgId").show();
    $("#renjunfeiyongBgId").hide();
    $("#yaopinfeiyongBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#yaopinfeiyongLiId").children().eq(1).hide();
    $("#renjunfeiyongLiId").children().eq(1).hide();

    //调图表方法
  });
}

//各科室各费用明细分析
function gekeshifeiyongmingxiFun() {
  $("#fangsheDRfeiId").click(function () {
    $("#fangsheDRfeiBgId").show();
    $("#cailiaofeiBgId").hide();
    $("#zhongchengyaofeiBgId").hide();
    $("#huayanfeiBgId").hide();
    $("#xuefeiBgId").hide();
    $("#fangsheCtBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#cailiaofeiId").children().eq(1).hide();
    $("#zhongchengyaofeiId").children().eq(1).hide();
    $("#huayanfeiId").children().eq(1).hide();
    $("#xuefeiId").children().eq(1).hide();
    $("#fangsheCtId").children().eq(1).hide();
    leftByiyaofeiFun();
  });
  $("#cailiaofeiId").click(function () {
    $("#fangsheDRfeiBgId").hide();
    $("#cailiaofeiBgId").show();
    $("#zhongchengyaofeiBgId").hide();
    $("#huayanfeiBgId").hide();
    $("#xuefeiBgId").hide();
    $("#fangsheCtBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fangsheDRfeiId").children().eq(1).hide();
    $("#zhongchengyaofeiId").children().eq(1).hide();
    $("#huayanfeiId").children().eq(1).hide();
    $("#xuefeiId").children().eq(1).hide();
    $("#fangsheCtId").children().eq(1).hide();
    leftBzhongchengyaofeiFun();
  });
  $("#zhongchengyaofeiId").click(function () {
    $("#fangsheDRfeiBgId").hide();
    $("#cailiaofeiBgId").hide();
    $("#zhongchengyaofeiBgId").show();
    $("#huayanfeiBgId").hide();
    $("#xuefeiBgId").hide();
    $("#fangsheCtBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fangsheDRfeiId").children().eq(1).hide();
    $("#cailiaofeiId").children().eq(1).hide();
    $("#huayanfeiId").children().eq(1).hide();
    $("#xuefeiId").children().eq(1).hide();
    $("#fangsheCtId").children().eq(1).hide();
    leftBzhenliaofeiFun();
  });
  $("#huayanfeiId").click(function () {
    $("#fangsheDRfeiBgId").hide();
    $("#cailiaofeiBgId").hide();
    $("#zhongchengyaofeiBgId").hide();
    $("#huayanfeiBgId").show();
    $("#xuefeiBgId").hide();
    $("#fangsheCtBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fangsheDRfeiId").children().eq(1).hide();
    $("#cailiaofeiId").children().eq(1).hide();
    $("#zhongchengyaofeiId").children().eq(1).hide();
    $("#xuefeiId").children().eq(1).hide();
    $("#fangsheCtId").children().eq(1).hide();
    leftBhuayanfeiFun();
  });
  $("#xuefeiId").click(function () {
    $("#fangsheDRfeiBgId").hide();
    $("#cailiaofeiBgId").hide();
    $("#zhongchengyaofeiBgId").hide();
    $("#huayanfeiBgId").hide();
    $("#xuefeiBgId").show();
    $("#fangsheCtBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fangsheDRfeiId").children().eq(1).hide();
    $("#cailiaofeiId").children().eq(1).hide();
    $("#zhongchengyaofeiId").children().eq(1).hide();
    $("#huayanfeiId").children().eq(1).hide();
    $("#fangsheCtId").children().eq(1).hide();
    leftBxuefeiFun();
  });
  $("#fangsheCtId").click(function () {
    $("#fangsheDRfeiBgId").hide();
    $("#cailiaofeiBgId").hide();
    $("#zhongchengyaofeiBgId").hide();
    $("#huayanfeiBgId").hide();
    $("#xuefeiBgId").hide();
    $("#fangsheCtBgId").show();
    // 线
    $(this).children().eq(1).show();
    $("#fangsheDRfeiId").children().eq(1).hide();
    $("#cailiaofeiId").children().eq(1).hide();
    $("#zhongchengyaofeiId").children().eq(1).hide();
    $("#huayanfeiId").children().eq(1).hide();
    $("#xuefeiId").children().eq(1).hide();
    leftBfangsheCtFun();
  });
}
// 各科室出院患者费用分析选项卡
function gekeshichuyuanhuanzhefenxiFun(databArr) {
  // console.log(databArr);
  var datajzzybArr = databArr.jzzyb; //门诊
  var datagkzybArr = databArr.gkzyb; //骨科
  var dataxtsArr = databArr.xts; //血透
  var datawkzybArr = databArr.wkzyb; //外科
  var datankzybArr = databArr.nkzyb; //内科
  var datakfllzybArr = databArr.kfllzyb; //康复
  $("#fuhankezhuyuanbuId").click(function () {
    $("#fuchankezhuyuanbuBgId").show();
    $("#jizhenzhuyuanbuBgId").hide();
    $("#gukezhuyuanbuBgId").hide();
    $("#xuetoushiBgId").hide();
    $("#kangfuzhuyaunbuBgId").hide();
    $("#neikeBgId").hide();
    $("#waikezhuyaunbuBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#jizhenzhuyuanbuId").children().eq(1).hide();
    $("#gukezhuyuanbuId").children().eq(1).hide();
    $("#xuejishiId").children().eq(1).hide();
    $("#waikezhuyuanbuId").children().eq(1).hide();
    $("#neikezhuyuanbuId").children().eq(1).hide();
    $("#kangfuzhuyuanbuId").children().eq(1).hide();
    // leftCfuchankezhuyuanFun();
  });
  $("#jizhenzhuyuanbuId").click(function () {
    $("#fuchankezhuyuanbuBgId").hide();
    $("#jizhenzhuyuanbuBgId").show();
    $("#gukezhuyuanbuBgId").hide();
    $("#xuetoushiBgId").hide();
    $("#waikezhuyaunbuBgId").hide();
    $("#kangfuzhuyaunbuBgId").hide();
    $("#neikeBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fuhankezhuyuanbuId").children().eq(1).hide();
    $("#gukezhuyuanbuId").children().eq(1).hide();
    $("#xuejishiId").children().eq(1).hide();
    $("#waikezhuyuanbuId").children().eq(1).hide();
    $("#neikezhuyuanbuId").children().eq(1).hide();
    $("#kangfuzhuyuanbuId").children().eq(1).hide();
    leftCjizhenzhuyuanbuFun(datajzzybArr);
  });
  $("#gukezhuyuanbuId").click(function () {
    $("#fuchankezhuyuanbuBgId").hide();
    $("#jizhenzhuyuanbuBgId").hide();
    $("#gukezhuyuanbuBgId").show();
    $("#xuetoushiBgId").hide();
    $("#kangfuzhuyaunbuBgId").hide();
    $("#neikeBgId").hide();
    $("#waikezhuyaunbuBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fuhankezhuyuanbuId").children().eq(1).hide();
    $("#jizhenzhuyuanbuId").children().eq(1).hide();
    $("#xuejishiId").children().eq(1).hide();
    $("#waikezhuyuanbuId").children().eq(1).hide();
    $("#neikezhuyuanbuId").children().eq(1).hide();
    $("#kangfuzhuyuanbuId").children().eq(1).hide();
    leftCgukezhuyuanbuFun(datagkzybArr);
  });
  $("#xuejishiId").click(function () {
    $("#fuchankezhuyuanbuBgId").hide();
    $("#jizhenzhuyuanbuBgId").hide();
    $("#gukezhuyuanbuBgId").hide();
    $("#xuetoushiBgId").show();
    $("#kangfuzhuyaunbuBgId").hide();
    $("#neikeBgId").hide();
    $("#waikezhuyaunbuBgId").hide();
    // 线
    $(this).children().eq(1).show();
    $("#fuhankezhuyuanbuId").children().eq(1).hide();
    $("#jizhenzhuyuanbuId").children().eq(1).hide();
    $("#gukezhuyuanbuId").children().eq(1).hide();
    $("#waikezhuyuanbuId").children().eq(1).hide();
    $("#neikezhuyuanbuId").children().eq(1).hide();
    $("#kangfuzhuyuanbuId").children().eq(1).hide();
    leftCxuetoushiFun(dataxtsArr);
  });
  $("#waikezhuyuanbuId").click(function () {
    $("#fuchankezhuyuanbuBgId").hide();
    $("#jizhenzhuyuanbuBgId").hide();
    $("#gukezhuyuanbuBgId").hide();
    $("#xuetoushiBgId").hide();
    $("#kangfuzhuyaunbuBgId").hide();
    $("#neikeBgId").hide();
    $("#waikezhuyaunbuBgId").show();
    // 线
    $(this).children().eq(1).show();
    $("#fuhankezhuyuanbuId").children().eq(1).hide();
    $("#jizhenzhuyuanbuId").children().eq(1).hide();
    $("#gukezhuyuanbuId").children().eq(1).hide();
    $("#xuejishiId").children().eq(1).hide();
    $("#neikezhuyuanbuId").children().eq(1).hide();
    $("#kangfuzhuyuanbuId").children().eq(1).hide();
    leftCwaikeFun(datawkzybArr);
  });
  $("#neikezhuyuanbuId").click(function () {
    $("#fuchankezhuyuanbuBgId").hide();
    $("#jizhenzhuyuanbuBgId").hide();
    $("#gukezhuyuanbuBgId").hide();
    $("#xuetoushiBgId").hide();
    $("#waikezhuyaunbuBgId").hide();
    $("#kangfuzhuyaunbuBgId").hide();
    $("#neikeBgId").show();
    // 线
    $(this).children().eq(1).show();
    $("#fuhankezhuyuanbuId").children().eq(1).hide();
    $("#jizhenzhuyuanbuId").children().eq(1).hide();
    $("#gukezhuyuanbuId").children().eq(1).hide();
    $("#xuejishiId").children().eq(1).hide();
    $("#waikezhuyuanbuId").children().eq(1).hide();
    $("#kangfuzhuyuanbuId").children().eq(1).hide();
    leftCneikeFun(datankzybArr);
  });
  $("#kangfuzhuyuanbuId").click(function () {
    $("#fuchankezhuyuanbuBgId").hide();
    $("#jizhenzhuyuanbuBgId").hide();
    $("#gukezhuyuanbuBgId").hide();
    $("#xuetoushiBgId").hide();
    $("#waikezhuyaunbuBgId").hide();
    $("#neikeBgId").hide();
    $("#kangfuzhuyaunbuBgId").show();
    // 线
    $(this).children().eq(1).show();
    $("#fuhankezhuyuanbuId").children().eq(1).hide();
    $("#jizhenzhuyuanbuId").children().eq(1).hide();
    $("#gukezhuyuanbuId").children().eq(1).hide();
    $("#xuejishiId").children().eq(1).hide();
    $("#waikezhuyuanbuId").children().eq(1).hide();
    $("#neikezhuyuanbuId").children().eq(1).hide();
    leftCkangfuFun(datakfllzybArr);
  });
}

//左表一之门诊费用
function leftAmenzhenFun() {
  // 初始化
  var myChart = echarts.init(document.getElementById("mengzhengfeiyongBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getdata2.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);

      var dataArr = $.parseJSON(msg).mzcost;
      // x轴
      var zhongyike = dataArr[0].deptname;
      var pifuke = dataArr[1].deptname;
      var jizhenke = dataArr[2].deptname;
      var waikemenzhen = dataArr[3].deptname;
      var fuchankemenzhen = dataArr[4].deptname;
      var neikemenzhen = dataArr[5].deptname;
      // y轴
      var zhongyikeVal = dataArr[0].mcost;
      var pifukeVal = dataArr[1].mcost;
      var jizhenkeVal = dataArr[2].mcost;
      var waikemenzhenVal = dataArr[3].mcost;
      var fuchankemenzhenVal = dataArr[4].mcost;
      var neikemenzhenVal = dataArr[5].mcost;
      // console.log(neikemenzhenVal);
      option = {
        grid: {
          left: 0,
          right: 0,
          bottom: -10,
          containLabel: true,
          show: true,
          width: "100%",
          height: "100%",
        },
        xAxis: {
          type: "category",
          // splitNumber = 6,
          splitLine: { show: false },
          axisLabel: {
            show: true,
            color: "#0cf0ff",
            fontSize: 10,
            interval: 0,
            rotate: 15,
          },
          data: [
            zhongyike,
            pifuke,
            jizhenke,
            waikemenzhen,
            fuchankemenzhen,
            neikemenzhen,
          ],
        },
        yAxis: {
          type: "value",
          max: 300000,
          min: 0,
          splitNumber: 5,
          boundaryGap: [0.1, 0.1],

          axisLabel: {
            show: true,
            color: "#0cf0ff",
            fontSize: 12,
            splitNumber: 1,
            minInterval: 1,
            interval: 1,
          },
        },
        series: [
          {
            type: "bar",
            // stack: "总量",
            itemStyle: {
              barBorderColor: "#e8b5e4",
              color: "#e8b5e4",
              borderWidth: 1,
              barBorderRadius: 10,
            },
            barWidth: 10,
            barCategoryGap: 5,
            data: [
              zhongyikeVal,
              pifukeVal,
              jizhenkeVal,
              waikemenzhenVal,
              fuchankemenzhenVal,
              neikemenzhenVal,
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}
//左表一之药品费用
function leftAyaopinFun() {
  // 初始化
  var myChart = echarts.init(document.getElementById("yaopinfeiyongBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getdata2.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);

      var dataArr = $.parseJSON(msg).mzcost;
      // x轴
      var zhongyike = dataArr[0].deptname;
      var pifuke = dataArr[1].deptname;
      var jizhenke = dataArr[2].deptname;
      var waikemenzhen = dataArr[3].deptname;
      var fuchankemenzhen = dataArr[4].deptname;
      var neikemenzhen = dataArr[5].deptname;
      // y轴
      var zhongyikeVal = dataArr[0].ypcost;
      var pifukeVal = dataArr[1].ypcost;
      var jizhenkeVal = dataArr[2].ypcost;
      var waikemenzhenVal = dataArr[3].ypcost;
      var fuchankemenzhenVal = dataArr[4].ypcost;
      var neikemenzhenVal = dataArr[5].ypcost;
      // console.log(neikemenzhenVal);
      option = {
        grid: {
          left: 0,
          right: 0,
          bottom: -8,
          containLabel: true,
          show: true,
          width: "100%",
          height: "100%",
        },
        xAxis: {
          type: "category",
          // splitNumber = 6,
          splitLine: { show: false },
          axisLabel: {
            show: true,
            color: "#0cf0ff",
            fontSize: 10,
            interval: 0,
            rotate: 10,
          },
          data: [
            zhongyike,
            pifuke,
            jizhenke,
            waikemenzhen,
            fuchankemenzhen,
            neikemenzhen,
          ],
        },
        yAxis: {
          type: "value",
          max: 300000,
          min: 0,
          splitNumber: 5,
          boundaryGap: [0.1, 0.1],

          axisLabel: {
            show: true,
            color: "#0cf0ff",
            fontSize: 12,
            splitNumber: 1,
            minInterval: 1,
            interval: 1,
          },
        },
        series: [
          {
            type: "bar",
            // stack: "总量",
            itemStyle: {
              barBorderColor: "#e8b5e4",
              color: "#e8b5e4",
              borderWidth: 1,
              barBorderRadius: 10,
            },
            barWidth: 10,
            barCategoryGap: 5,
            data: [
              zhongyikeVal,
              pifukeVal,
              jizhenkeVal,
              waikemenzhenVal,
              fuchankemenzhenVal,
              neikemenzhenVal,
            ],
          },
        ],
      };

      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}

//左表一之人均费用
function leftArenjunfenyongFun() {
  // 初始化
  var myChart = echarts.init(document.getElementById("renjunfeiyongBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getdata2.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);

      var dataArr = $.parseJSON(msg).mzcost;
      // x轴
      var zhongyike = dataArr[0].deptname;
      var pifuke = dataArr[1].deptname;
      var jizhenke = dataArr[2].deptname;
      var waikemenzhen = dataArr[3].deptname;
      var fuchankemenzhen = dataArr[4].deptname;
      var neikemenzhen = dataArr[5].deptname;
      // y轴
      var zhongyikeVal = dataArr[0].renjun;
      var pifukeVal = dataArr[1].renjun;
      var jizhenkeVal = dataArr[2].renjun;
      var waikemenzhenVal = dataArr[3].renjun;
      var fuchankemenzhenVal = dataArr[4].renjun;
      var neikemenzhenVal = dataArr[5].renjun;
      console.log(neikemenzhenVal);
      option = {
        grid: {
          left: 0,
          right: 0,
          bottom: -8,
          containLabel: true,
          show: true,
          width: "100%",
          height: "100%",
        },
        xAxis: {
          type: "category",
          // splitNumber = 6,
          splitLine: { show: false },
          axisLabel: {
            show: true,
            color: "#0cf0ff",
            fontSize: 10,
            interval: 0,
            rotate: 10,
          },
          data: [
            zhongyike,
            pifuke,
            jizhenke,
            waikemenzhen,
            fuchankemenzhen,
            neikemenzhen,
          ],
        },
        yAxis: {
          type: "value",
          max: 2000,
          min: 0,
          splitNumber: 5,
          boundaryGap: [0.1, 0.1],

          axisLabel: {
            show: true,
            color: "#0cf0ff",
            fontSize: 12,
            splitNumber: 1,
            minInterval: 1,
            interval: 1,
          },
        },
        series: [
          {
            type: "bar",
            // stack: "总量",
            itemStyle: {
              barBorderColor: "#e8b5e4",
              color: "#e8b5e4",
              borderWidth: 1,
              barBorderRadius: 10,
            },
            barWidth: 10,
            barCategoryGap: 5,
            data: [
              zhongyikeVal,
              pifukeVal,
              jizhenkeVal,
              waikemenzhenVal,
              fuchankemenzhenVal,
              neikemenzhenVal,
            ],
          },
        ],
      };

      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}

//左表二之放射DR费
function leftByiyaofeiFun() {
  var myChart = echarts.init(document.getElementById("fangsheDRfeiBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).fsdrf;
      // console.log(dataArr);
      var neikezhuyuanbuText = dataArr[0].deptname;
      var neikezhuyuanbuCost = dataArr[0].totcost;
      var waikezhuyuanbuText = dataArr[1].deptname;
      var waikezhuyuanbuCost = dataArr[1].totcost;
      var gukezhuyuanbuText = dataArr[2].deptname;
      var guikezhuyuanbuCost = dataArr[2].totcost;
      var xuetoushiText = dataArr[3].deptname;
      var xuetoushiCost = dataArr[3].totcost;
      // console.log(xuetoushiCost);

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "50%"],
            selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,

            emphasis: {
              // 高亮区样式
              itemStyle: {},
            },
            data: [
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FA8072",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FA8072", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FA8072", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikezhuyuanbuCost,
                name: waikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#3CB371",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#3CB371", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#3CB371", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: guikezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4BD0E2",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4BD0E2", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4BD0E2", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: xuetoushiCost,
                name: xuetoushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#1A9AFA",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#1A9AFA", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#1A9AFA", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });

  // myChart.setOption(option);
}
// 左表二之中材料费
function leftBzhongchengyaofeiFun() {
  var myChart = echarts.init(document.getElementById("cailiaofeiBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).ybclf;
      // console.log(dataArr);
      var jianyankeText = dataArr[0].deptname;
      var jianyankeCost = dataArr[0].totcost;
      var neikemenzhenText = dataArr[1].deptname;
      var neikemenzhenCost = dataArr[1].totcost;
      var neikezhuyuanbuText = dataArr[2].deptname;
      var neikezhuyuanbuCost = dataArr[2].totcost;
      var waikezhuyuanbuText = dataArr[3].deptname;
      var waikezhuyuanbuCost = dataArr[3].totcost;
      var gukezhuyuanbuText = dataArr[4].deptname;
      var guikezhuyuanbuCost = dataArr[4].totcost;
      var fuchankezhuyuanbuText = dataArr[5].deptname;
      var fuchankezhuyuanbuCost = dataArr[5].totcost;
      var shoushushiText = dataArr[6].deptname;
      var shoushushiCost = dataArr[6].totcost;
      var xuetoushiText = dataArr[7].deptname;
      var xuetoushiCost = dataArr[7].totcost;
      var waikemenzhenText = dataArr[8].deptname;
      var waikemenzhenCost = dataArr[8].totcost;
      var renminyiyuanText = dataArr[9].deptname;
      var renminyiyuanCost = dataArr[9].totcost;
      // console.log(renminyiyuanCost);

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "60%"],
            // selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,
            avoidLabelOverlap: true,
            minAngle: 60,
            data: [
              {
                value: jianyankeCost,
                name: jianyankeText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4BD0E2",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4BD0E2", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4BD0E2", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikemenzhenCost,
                name: neikemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#1A9AFA",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#1A9AFA", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#1A9AFA", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FDC0EB",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FDC0EB", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FDC0EB", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikezhuyuanbuCost,
                name: waikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#F7D36A",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#F7D36A", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#F7D36A", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: guikezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FFA378",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FFA378", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FFA378", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: fuchankezhuyuanbuCost,
                name: fuchankezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#CFF881",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#CFF881", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#CFF881", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: shoushushiCost,
                name: shoushushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE5A0",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE5A0", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE5A0", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: xuetoushiCost,
                name: xuetoushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4682B4",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4682B4", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4682B4", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikemenzhenCost,
                name: waikemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE9FC",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE9FC", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE9FC", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: renminyiyuanCost,
                name: renminyiyuanText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#0cf0ff",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#0cf0ff", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#0cf0ff", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}
// 左表二之中成药费
function leftBzhenliaofeiFun() {
  var myChart = echarts.init(document.getElementById("zhongchengyaofeiBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).zcyf;
      console.log(dataArr);
      var neikemenzhenText = dataArr[0].deptname;
      var neikemenzhenCost = dataArr[0].totcost;
      var neikezhuyuanbuText = dataArr[1].deptname;
      var neikezhuyuanbuCost = dataArr[1].totcost;
      var waikezhuyuanbuText = dataArr[2].deptname;
      var waikezhuyuanbuCost = dataArr[2].totcost;
      var gukezhuyuanbuText = dataArr[3].deptname;
      var gukezhuyuanbuCost = dataArr[3].totcost;
      var fukezhuyuanbuText = dataArr[4].deptname;
      var fukezhuyuanbuCost = dataArr[4].totcost;
      var shoushushiText = dataArr[5].deptname;
      var shoushushiCost = dataArr[5].totcost;
      var xuetoushiText = dataArr[6].deptname;
      var xuetoushiCost = dataArr[6].totcost;
      var waikememzhenText = dataArr[7].deptname;
      var waikememzhenCost = dataArr[7].totcost;
      var gukemenzhenText = dataArr[8].deptname;
      var gukemenzhenCost = dataArr[8].totcost;

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "60%"],
            // selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,
            avoidLabelOverlap: true,
            minAngle: 60,
            data: [
              {
                value: neikemenzhenCost,
                name: neikemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4BD0E2",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4BD0E2", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4BD0E2", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikemenzhenCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#1A9AFA",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#1A9AFA", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#1A9AFA", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FDC0EB",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FDC0EB", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FDC0EB", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikezhuyuanbuCost,
                name: waikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#F7D36A",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#F7D36A", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#F7D36A", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: gukezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FFA378",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FFA378", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FFA378", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: fukezhuyuanbuCost,
                name: fukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#CFF881",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#CFF881", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#CFF881", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: shoushushiCost,
                name: shoushushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE5A0",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE5A0", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE5A0", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: xuetoushiCost,
                name: xuetoushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE9FC",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE9FC", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE9FC", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikememzhenCost,
                name: waikememzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4682B4",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4682B4", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4682B4", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: gukemenzhenCost,
                name: gukemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FA8072",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FA8072", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FA8072", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}
// 左表二之化验费
function leftBhuayanfeiFun() {
  var myChart = echarts.init(document.getElementById("huayanfeiBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).hyf;
      // console.log(dataArr);
      var jianyankeText = dataArr[0].deptname;
      var jianyankeCost = dataArr[0].totcost;
      var neikemenzhenText = dataArr[1].deptname;
      var neikemenzhenCost = dataArr[1].totcost;
      var neikezhuyuanbuText = dataArr[2].deptname;
      var neikezhuyuanbuCost = dataArr[2].totcost;
      var waikezhuyuanbuText = dataArr[3].deptname;
      var waikezhuyuanbuCost = dataArr[3].totcost;
      var gukezhuyuanbuText = dataArr[4].deptname;
      var gukezhuyuanbuCost = dataArr[4].totcost;
      var fuchankezhuyuanbuText = dataArr[5].deptname;
      var fuchankezhuyuanbuCost = dataArr[5].totcost;
      var xuetoushiText = dataArr[6].deptname;
      var xuetoushiCost = dataArr[6].totcost;
      var waikemenzhenText = dataArr[7].deptname;
      var waikemenzhenCost = dataArr[7].totcost;
      var kangfuText = dataArr[8].deptname;
      var kangfuCost = dataArr[8].totcost;
      var jizhenzhuyuanbuText = dataArr[9].deptname;
      var jizhenzhuyuanbuCost = dataArr[9].totcost;
      var renmingyiyuanText = dataArr[10].deptname;
      var renmingyiyuanCost = dataArr[10].totcost;

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "60%"],
            // selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,
            avoidLabelOverlap: true,
            minAngle: 60,
            data: [
              {
                value: jianyankeCost,
                name: jianyankeText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FA8072",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FA8072", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FA8072", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikemenzhenCost,
                name: neikemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#3CB371",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#3CB371", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#3CB371", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4BD0E2",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4BD0E2", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4BD0E2", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikezhuyuanbuCost,
                name: waikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#1A9AFA",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#1A9AFA", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#1A9AFA", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: gukezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FDC0EB",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FDC0EB", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FDC0EB", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: fuchankezhuyuanbuCost,
                name: fuchankezhuyuanbuText,
                label: {
                  // 引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#F7D36A",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#F7D36A", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#F7D36A", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: xuetoushiCost,
                name: xuetoushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FFA378",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FFA378", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FFA378", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikemenzhenCost,
                name: waikemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#CFF881",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#CFF881", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#CFF881", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: kangfuCost,
                name: kangfuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE5A0",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE5A0", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE5A0", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: jizhenzhuyuanbuCost,
                name: jizhenzhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE9FC",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE9FC", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE9FC", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: renmingyiyuanCost,
                name: renmingyiyuanText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4682B4",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4682B4", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4682B4", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}
// 左表二之血费
function leftBxuefeiFun() {
  var myChart = echarts.init(document.getElementById("xuefeiBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).xf;
      console.log(dataArr);
      var neikezhuyuanbuText = dataArr[0].deptname;
      var neikezhuyuanbuCost = dataArr[0].totcost;
      var gukezhuyuanbuText = dataArr[1].deptname;
      var gukezhuyuanbuCost = dataArr[1].totcost;

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "60%"],
            // selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,
            avoidLabelOverlap: true,
            minAngle: 60,
            data: [
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FA8072",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FA8072", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FA8072", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: gukezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#3CB371",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#3CB371", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#3CB371", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}
// 左表二之放射Ct
function leftBfangsheCtFun() {
  var myChart = echarts.init(document.getElementById("fangsheCtBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).fsct;
      console.log(dataArr);
      var neikemenzhenText = dataArr[0].deptname;
      var neikemenzhenCost = dataArr[0].totcost;
      var neikezhuyuanbuText = dataArr[1].deptname;
      var neikezhuyuanbuCost = dataArr[1].totcost;
      var waikezhuyuanbuText = dataArr[2].deptname;
      var waikezhuyuanbuCost = dataArr[2].totcost;
      var gukezhuyuanbuText = dataArr[3].deptname;
      var gukezhuyuanbuCost = dataArr[3].totcost;
      var xuetoushiText = dataArr[4].deptname;
      var xuetoushiCost = dataArr[4].totcost;
      // var waikemenzhenText = dataArr[5].deptname;
      // var waikemenzhenCost = dataArr[5].totcost;

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "60%"],
            // selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,
            avoidLabelOverlap: true,
            minAngle: 60,
            data: [
              {
                value: neikemenzhenCost,
                name: neikemenzhenText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FA8072",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FA8072", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FA8072", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#4BD0E2",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#4BD0E2", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#4BD0E2", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: waikezhuyuanbuCost,
                name: waikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FDC0EB",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FDC0EB", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FDC0EB", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: gukezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#F7D36A",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#F7D36A", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#F7D36A", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: xuetoushiCost,
                name: xuetoushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FFA378",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FFA378", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FFA378", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}
// 左表三出院患者分析请求
function chuyuanhuanzhefenxiFun() {
  $.ajax({
    type: "get",
    url: server + "/gldaping/getChuYuanCost.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var databArr = $.parseJSON(msg);
      var datafckzybArr = databArr.fckzyb;
      leftCfuchankezhuyuanFun(datafckzybArr);
      gekeshichuyuanhuanzhefenxiFun(databArr);
    },
  });
}

//左表三之妇产科
function leftCfuchankezhuyuanFun(datafckzybArr) {
  // console.log(datafckzybArr);
  var myChart = echarts.init(document.getElementById("fuchankezhuyuanbuBgId"));

  var rijuncostA = datafckzybArr[0].rijuncost;
  var renjunCostA = datafckzybArr[0].renjuncost;
  var rijuncostB = datafckzybArr[1].rijuncost;
  var renjunCostB = datafckzybArr[1].renjuncost;
  var rijuncostC = datafckzybArr[2].rijuncost;
  var renjunCostC = datafckzybArr[2].renjuncost;
  var rijuncostD = datafckzybArr[3].rijuncost;
  var renjunCostD = datafckzybArr[3].renjuncost;
  var rijuncostE = datafckzybArr[4].rijuncost;
  var renjunCostE = datafckzybArr[4].renjuncost;
  var rijuncostF = datafckzybArr[5].rijuncost;
  var renjunCostF = datafckzybArr[5].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#0cf0ff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          // borderColor: "#3CB371",
          color: "#3CB371",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          renjunCostD,
          renjunCostE,
          renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          // borderColor: "#FA8072",
          color: "#FA8072",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          rijuncostD,
          rijuncostE,
          rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
//左表三之急诊住院部
function leftCjizhenzhuyuanbuFun(datajzzybArr) {
  console.log(datajzzybArr);
  var myChart = echarts.init(document.getElementById("jizhenzhuyuanbuBgId"));

  // 急诊住院部
  var rijuncostA = datajzzybArr[0].rijuncost;
  var renjunCostA = datajzzybArr[0].renjuncost;
  var rijuncostB = datajzzybArr[1].rijuncost;
  var renjunCostB = datajzzybArr[1].renjuncost;
  var rijuncostC = datajzzybArr[2].rijuncost;
  var renjunCostC = datajzzybArr[2].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#fff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#3CB371",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          // renjunCostD,
          // renjunCostE,
          // renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#FA8072",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          // rijuncostD,
          // rijuncostE,
          // rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
//左表三之骨科住院部
function leftCgukezhuyuanbuFun(datagkzybArr) {
  var myChart = echarts.init(document.getElementById("gukezhuyuanbuBgId"));
  // 骨科住院部
  var rijuncostA = datagkzybArr[0].rijuncost;
  var renjunCostA = datagkzybArr[0].renjuncost;
  var rijuncostB = datagkzybArr[1].rijuncost;
  var renjunCostB = datagkzybArr[1].renjuncost;
  var rijuncostC = datagkzybArr[2].rijuncost;
  var renjunCostC = datagkzybArr[2].renjuncost;
  var rijuncostD = datagkzybArr[3].rijuncost;
  var renjunCostD = datagkzybArr[3].renjuncost;
  var rijuncostE = datagkzybArr[4].rijuncost;
  var renjunCostE = datagkzybArr[4].renjuncost;
  var rijuncostF = datagkzybArr[5].rijuncost;
  var renjunCostF = datagkzybArr[5].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#fff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#3CB371",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          renjunCostD,
          renjunCostE,
          renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#FA8072",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          rijuncostD,
          rijuncostE,
          rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
//左表三之血透室
function leftCxuetoushiFun(dataxtsArr) {
  var myChart = echarts.init(document.getElementById("xuetoushiBgId"));

  // 血透住院部
  var rijuncostA = dataxtsArr[0].rijuncost;
  var renjunCostA = dataxtsArr[0].renjuncost;
  var rijuncostB = dataxtsArr[1].rijuncost;
  var renjunCostB = dataxtsArr[1].renjuncost;
  var rijuncostC = dataxtsArr[2].rijuncost;
  var renjunCostC = dataxtsArr[2].renjuncost;
  var rijuncostD = dataxtsArr[3].rijuncost;
  var renjunCostD = dataxtsArr[3].renjuncost;
  var rijuncostE = dataxtsArr[4].rijuncost;
  var renjunCostE = dataxtsArr[4].renjuncost;
  var rijuncostF = dataxtsArr[5].rijuncost;
  var renjunCostF = dataxtsArr[5].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#fff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#3CB371",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          renjunCostD,
          renjunCostE,
          renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#FA8072",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          rijuncostD,
          rijuncostE,
          rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
//左表三之外科住院部
function leftCwaikeFun(datawkzybArr) {
  var myChart = echarts.init(document.getElementById("waikezhuyaunbuBgId"));

  var rijuncostA = datawkzybArr[0].rijuncost;
  var renjunCostA = datawkzybArr[0].renjuncost;
  var rijuncostB = datawkzybArr[1].rijuncost;
  var renjunCostB = datawkzybArr[1].renjuncost;
  var rijuncostC = datawkzybArr[2].rijuncost;
  var renjunCostC = datawkzybArr[2].renjuncost;
  var rijuncostD = datawkzybArr[3].rijuncost;
  var renjunCostD = datawkzybArr[3].renjuncost;
  var rijuncostE = datawkzybArr[4].rijuncost;
  var renjunCostE = datawkzybArr[4].renjuncost;
  var rijuncostF = datawkzybArr[5].rijuncost;
  var renjunCostF = datawkzybArr[5].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#fff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#3CB371",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          renjunCostD,
          renjunCostE,
          renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#FA8072",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          rijuncostD,
          rijuncostE,
          rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
//左表三之内科住院部
function leftCneikeFun(datankzybArr) {
  var myChart = echarts.init(document.getElementById("neikeBgId"));

  // 内科住院部
  var rijuncostA = datankzybArr[0].rijuncost;
  var renjunCostA = datankzybArr[0].renjuncost;
  var rijuncostB = datankzybArr[1].rijuncost;
  var renjunCostB = datankzybArr[1].renjuncost;
  var rijuncostC = datankzybArr[2].rijuncost;
  var renjunCostC = datankzybArr[2].renjuncost;
  var rijuncostD = datankzybArr[3].rijuncost;
  var renjunCostD = datankzybArr[3].renjuncost;
  var rijuncostE = datankzybArr[4].rijuncost;
  var renjunCostE = datankzybArr[4].renjuncost;
  var rijuncostF = datankzybArr[5].rijuncost;
  var renjunCostF = datankzybArr[5].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,

        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#0cf0ff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#3CB371",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          renjunCostD,
          renjunCostE,
          renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#FA8072",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          rijuncostD,
          rijuncostE,
          rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}
//左表三之康复住院部
function leftCkangfuFun(datakfllzybArr) {
  var myChart = echarts.init(document.getElementById("kangfuzhuyaunbuBgId"));

  // 康复住院部
  var rijuncostA = datakfllzybArr[0].rijuncost;
  var renjunCostA = datakfllzybArr[0].renjuncost;
  var rijuncostB = datakfllzybArr[1].rijuncost;
  var renjunCostB = datakfllzybArr[1].renjuncost;
  var rijuncostC = datakfllzybArr[2].rijuncost;
  var renjunCostC = datakfllzybArr[2].renjuncost;
  var rijuncostD = datakfllzybArr[3].rijuncost;
  var renjunCostD = datakfllzybArr[3].renjuncost;
  var rijuncostE = datakfllzybArr[4].rijuncost;
  var renjunCostE = datakfllzybArr[4].renjuncost;

  option = {
    // color: "#fff",

    grid: {
      left: "0",
      right: "0",
      bottom: "5",
      top: "10",
      show: true,
      containLabel: true,
      width: "98%",
      height: "90%",
    },
    xAxis: [
      {
        type: "category",
        boundaryGap: false,
        data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    yAxis: [
      {
        type: "value",
        max: 10000,
        min: 0,
        splitNumber: 5,
        boundaryGap: [0.1, 0.1],
        axisLabel: {
          textStyle: {
            color: "#0cf0ff",
            fontSize: "12",
          },
        },
        axisLine: {
          lineStyle: {
            color: "#0cf0ff",
          },
        },
      },
    ],
    axisLabel: {
      color: "#0cf0ff",
    },
    series: [
      {
        name: "人均费用",
        type: "line",
        smooth: true,
        // stack: "总量",
        areaStyle: {
          color: "rgba(60,179,113,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#3CB371",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          renjunCostA,
          renjunCostB,
          renjunCostC,
          renjunCostD,
          renjunCostE,
          // renjunCostF,
        ],
      },

      {
        name: "日均费用",
        type: "line",
        // stack: "总量",
        smooth: true,

        areaStyle: {
          color: "rgba(250,128,114,0.2)",
        },
        symbol: "circle",
        symbolSize: 7,
        showSymbol: true,
        itemStyle: {
          color: "#FA8072",
          // border: "rabg(23,92,108,0.5)",
          borderWidth: 10,
        },
        data: [
          rijuncostA,
          rijuncostB,
          rijuncostC,
          rijuncostD,
          rijuncostE,
          // rijuncostF,
        ],
      },
    ],
  };
  myChart.setOption(option);
  window.addEventListener("resize", function () {
    myChart.resize();
  });
}

// 右表一
function zhuyuanrenshutongjiFun() {
  // 初始化
  var myChart = echarts.init(
    document.getElementById("gekeshizhuyuanrenshutongjiBgId")
  );
  $.ajax({
    type: "get",
    url: server + "/gldaping/getKeShiZhuYuanNum.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).zhuyuanrenshu;
      // console.log(dataArr);
      var xuetoushiText = dataArr[0].deptname;
      var xuetoushiCost = dataArr[0].num;
      var neikezhuyuanbuText = dataArr[1].deptname;
      var neikezhuyuanbuCost = dataArr[1].num;
      var fukezhuyuanbuText = dataArr[2].deptname;
      var fukezhuyuanbuCost = dataArr[2].num;
      var waikezhuyuanbuText = dataArr[3].deptname;
      var waikezhuyuanbuCost = dataArr[3].num;
      var jizhenzhuyuanbuText = dataArr[4].deptname;
      var jizhenzhuyuanbuCost = dataArr[4].num;
      var kangfuliliaoText = dataArr[5].deptname;
      var kangfuliliaoCost = dataArr[5].num;
      var gukezhuyuanbuText = dataArr[6].deptname;
      var gukezhuyuanbuCost = dataArr[6].num;

      option = {
        series: [
          {
            type: "pie",
            radius: "70%",
            center: ["50%", "60%"],
            // selectedMode: "single",
            width: "auto",
            height: "auto",
            left: -20,
            top: 10,
            avoidLabelOverlap: true,
            minAngle: 60,

            data: [
              {
                value: xuetoushiCost,
                name: xuetoushiText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#3CB371",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#3CB371", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#3CB371", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: neikezhuyuanbuCost,
                name: neikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FA8072",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FA8072", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FA8072", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: fukezhuyuanbuCost,
                name: fukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FDC0EB",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FDC0EB", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FDC0EB", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },

              {
                value: waikezhuyuanbuCost,
                name: waikezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#FFA378",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#FFA378", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#FFA378", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: jizhenzhuyuanbuCost,
                name: jizhenzhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#CFF881",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#CFF881", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#CFF881", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: kangfuliliaoCost,
                name: kangfuliliaoText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE5A0",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE5A0", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE5A0", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
              {
                value: gukezhuyuanbuCost,
                name: gukezhuyuanbuText,
                label: {
                  //引导线文字设置
                  // backgroundColor: "#f00",
                  color: "#9BE9FC",
                  formatter: "{b}:{d}%",
                },
                itemStyle: {
                  color: {
                    type: "linear",
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "#9BE9FC", // 0% 处的颜色
                      },
                      {
                        offset: 1,
                        color: "#9BE9FC", // 100% 处的颜色
                      },
                    ],
                  },
                },
              },
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}

// 右表二
function jiuzhenhuanzheFun() {
  var myChart = echarts.init(
    document.getElementById("jiuzhenhuanzhezhengduanpaihangBgId")
  );
  $.ajax({
    type: "get",
    url: server + "/gldaping/getJiuZenNumSort.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).jiuzensort;
      // console.log(dataArr);
      var gaoxueyaText = dataArr[0].diagname;
      var gaoxueyaVal = dataArr[0].num;
      var tangniaobingText = dataArr[1].diagname;
      var tangniaobingVal = dataArr[1].num;
      var songshangText = dataArr[2].diagname;
      var songshangVal = dataArr[2].num;
      var naogengsiText = dataArr[3].diagname;
      var naogengsiVal = dataArr[3].num;
      var futongText = dataArr[4].diagname;
      var futongVal = dataArr[4].num;
      var simianText = dataArr[5].diagname;
      var simianVal = dataArr[5].num;
      var niaoduText = dataArr[6].diagname;
      var niaoduVal = dataArr[6].num;
      var naotengText = dataArr[7].diagname;
      var naotengVal = dataArr[7].num;
      var touyunText = dataArr[8].diagname;
      var touyunVal = dataArr[8].num;
      var xinzangbingText = dataArr[9].diagname;
      var xinzangbingVal = dataArr[9].num;

      var myColor = [
        "#1089E7",
        "#F57474",
        "#56D0E3",
        "#F8B448",
        "#8B78F6",
        "#1089E7",
        "#F57474",
        "#56D0E3",
        "#F8B448",
        "#8B78F6",
      ];
      option = {
       
        grid: {
          left: "22%",
          right: "12%",
          bottom: "5%",
          top: "15%",
          containLabel: false,
        },
        // 不显示x轴信息
        xAxis: {
          show: false,
        },
        // 不显示y轴线和相关刻度
        yAxis: [
          {
            type: "category",
            inverse: true,
            data: [
              gaoxueyaText,
              tangniaobingText,
              songshangText,
              naogengsiText,
              futongText,
              simianText,
              niaoduText,
              naotengText,
              touyunText,
              // xinzangbingText,
            ],
            axisLine: {
              show: false,
            },
            axisTick: {
              show: false,
            },
            axisLabel: {
              color: "#0cf0ff",
              fontSize: 10,
            },
          },
          {
            type: "category",
            inverse: true,
            data: [
              gaoxueyaVal,
              tangniaobingVal,
              songshangVal,
              naogengsiVal,
              futongVal,
              simianVal,
              niaoduVal,
              naotengVal,
              touyunVal,
              // xinzangbingVal,
            ],
            axisLine: {
              show: false,
            },
            axisTick: {
              show: false,
            },
            axisLabel: {
              color: "#0cf0ff",
              fontSize: 10,
            },
          },
        ],
        series: [
          {
            name: "条",
            type: "bar",
            barCategoryGap: 20,
            barWidth: 7,
            yAxisIndex: 0,
            itemStyle: {
              barBorderRadius: 20,
              color: function (params) {
                // console.log(params);
                return myColor[params.dataIndex];
              },
            },
            data: [
              gaoxueyaVal,
              tangniaobingVal,
              songshangVal,
              naogengsiVal,
              futongVal,
              simianVal,
              niaoduVal,
              naotengVal,
              touyunVal,
              xinzangbingVal,
            ],
          },
          {
            name: "框",
            type: "bar",
            barCategoryGap: 20,
            barWidth: 12,
            yAxisIndex: 1,
            itemStyle: {
              color: "none",
              borderColor: "#00c1de",
              borderWidth: 3,
              barBorderRadius: 15,
            },
            data: [
              10000,
              10000,
              10000,
              10000,
              10000,
              10000,
              10000,
              10000,
              10000,
              // 10000,
            ],
          },
        ],
      };

      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}

//右表三 床位使用率
function chuangweishiyonglvFun() {
  // 初始化
  var myChart = echarts.init(document.getElementById("chuangweishiyonglvBgId"));
  $.ajax({
    type: "get",
    url: server + "/gldaping/getBingChuangData.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var dataArr = $.parseJSON(msg).bc;
      // console.log(dataArr);
      // 床位周转率 病床使用率 名称

      var keshimingchengA = dataArr[0].deptname;
      var zhouzhuanlvA = dataArr[0].bcutilization;
      var shiyonglvA = dataArr[0].bcturnover;
      // 护士站二 dataArr[0].nursecellname;
      // 护士站二 dataArr[1].nursecellname;
      var keshimingchengB = dataArr[2].deptname;
      var zhouzhuanlvB = dataArr[2].bcutilization;
      var shiyonglvB = dataArr[2].bcturnover;
      var keshimingchengC = dataArr[3].deptname;
      var zhouzhuanlvC = dataArr[3].bcutilization;
      var shiyonglvC = dataArr[3].bcturnover;
      var keshimingchengD = dataArr[4].deptname;
      var zhouzhuanlvD = dataArr[4].bcutilization;
      var shiyonglvD = dataArr[4].bcturnover;
      var keshimingchengE = dataArr[5].deptname;
      var zhouzhuanlvE = dataArr[5].bcutilization;
      var shiyonglvE = dataArr[5].bcturnover;
      var keshimingchengF = dataArr[6].deptname;
      var zhouzhuanlvF = dataArr[6].bcutilization;
      var shiyonglvF = dataArr[6].bcturnover;
      option = {
        // color: "#fff",

        grid: {
          left: "20",
          right: "0",
          bottom: "10",
          top: "30",
          show: true,
          containLabel: true,
          width: "90%",
          height: "85%",
        },
        xAxis: [
          {
            type: "category",
            boundaryGap: false,
            splitLine: { show: false },
            axisLabel: {
              textStyle: {
                show: true,
                color: "#0cf0ff",
                fontSize: 10,
              },
              interval: 0,
              rotate: 15,
            },
            axisLine: {
              lineStyle: {
                color: "#0cf0ff",
              },
            },
            data: [
              keshimingchengA,
              keshimingchengB,
              keshimingchengC,
              keshimingchengD,
              keshimingchengE,
              keshimingchengF,
            ],
          },
        ],
        yAxis: [
          {
            type: "value",
            max: 10,
            min: 0,
            splitNumber: 5,
            boundaryGap: [0.1, 0.1],
            axisLabel: {
              textStyle: {
                color: "#0cf0ff",
                fontSize: "12",
              },
            },
            axisLine: {
              lineStyle: {
                color: "#0cf0ff",
              },
            },
          },
        ],
        axisLabel: {
          color: "#fff",
        },
        series: [
          {
            name: "病床使用率",
            type: "line",
            smooth: true,
            // stack: "总量",
            areaStyle: {
              color: "rgba(60,179,113,0.2)",
            },
            symbol: "circle",
            symbolSize: 7,
            showSymbol: true,
            itemStyle: {
              color: "#3CB371",
              // border: "rabg(23,92,108,0.5)",
              borderWidth: 10,
            },
            data: [
              zhouzhuanlvA,
              zhouzhuanlvB,
              zhouzhuanlvC,
              zhouzhuanlvD,
              zhouzhuanlvE,
              zhouzhuanlvF,
            ],
          },

          {
            name: "病床周转率",
            type: "line",
            // stack: "总量",
            smooth: true,

            areaStyle: {
              color: "rgba(250,128,114,0.2)",
            },
            symbol: "circle",
            symbolSize: 7,
            showSymbol: true,
            itemStyle: {
              color: "#FA8072",
              // border: "rabg(23,92,108,0.5)",
              borderWidth: 10,
            },
            data: [
              shiyonglvA,
              shiyonglvB,
              shiyonglvC,
              shiyonglvD,
              shiyonglvE,
              shiyonglvF,
            ],
          },
        ],
      };
      myChart.setOption(option);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
  });
}

// map 容器
function mapWrapFun() {
  $("#liangzuoxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#wanghuxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#nancunzhen").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#yixinxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#jiadouxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#jiaoshanxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#yidouquanxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#zuotuanxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });

  $("#huquanxiang").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
}
// 点击乡的dots
function clickDotsFun() {
  $("#liangzuoxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#wanghuxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#nancunzhenDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#yixinxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#jiadouxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#jiaoshanxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#yidouquanxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#zuotuanxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
  $("#huquanxiangDots").click(function () {
    var xiangName = $(this).children().val();
    console.log(xiangName);
    jumpXiangPage(xiangName);
  });
}
function jumpXiangPage(xiangName) {
  console.log(xiangName);
  url = "xiangPage.html?name=" + xiangName; //此处拼接内容
  console.log(url);
  window.location.href = url;
}

// 各科室住院人数统计
function mainHeadFun() {
  // console.log(server);
  $.ajax({
    type: "get",
    url: server + "/gldaping/getShouYeHeader.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var data = JSON.parse(msg);
      var dataArr = data.header;
      $("#headerMenzhencishu").text(dataArr[0].menzennum);
      $("#headerjizhencishu").text(dataArr[0].jizennum);
      $("#headerruyuanrenshu").text(dataArr[0].ruyuanpeople);
      $("#headerchuyuanrenshu").text(dataArr[0].chuyuanpeople);
    },
  });
}
// 门诊日志
function mainmenzhenrizhiFun() {
  $.ajax({
    type: "get",
    url: server + "/gldaping/getMenZenRiZhi.do",
    // data: "name=John&location=Boston",
    success: function (msg) {
      // console.log("Data Saved: " + msg);
      var data = JSON.parse(msg);
      var dataArr = data.menzenrizhi;
      var html = "";
      $.each(dataArr, function (x, y) {
        // console.log(y.doctorname);
        html += "<ul>";
        html += "<li>" + y.num + "</li>";
        html += "<li>" + y.doctorname + "</li>";
        html += "<li>" + y.huanzename + "</li>";
        html += "<li>" + y.sex + "</li>";
        html += "<li>" + y.age + "</li>";
        html += "<li>" + y.leixing + "</li>";
        html += "<li>" + y.kanzendata + "</li>";
        html += "<li>" + y.zenduanname + "</li>";
        html += "</ul>";
      });
      $("#mengzhenrizhiBgContent").append(html);
    },
  });
}

// 定时器每隔1分钟获取刷新数据
function getDatePerMinite() {}
